function SrvEventType(params){ 
	 
}

SrvEventType.Where = function(type,proxy){
	this.type = type;
	this.proxy=proxy;
	this.linked = null;
	this.set = null;
	if(this.type==0){
		this.set = new SrvEventType.Where(1,true);
		this.set.linked = this;
	}
	this.getProxy = function(){
		var m = new SrvEventType.Where(this.type);//当前的对像
		if(this.type==0){
			m.set = new SrvEventType.Where(1,true);//set对象
			m.set.linked = m;
		}else{
			m.linked=this.linked;
			this.linked.linked=m;
		}
		return m;
	}
	this.data = {};
	this.put = function(key,value){
		this.data[key] = value;
	}
	this.get = function(key){
		return this.data[key];
	}
	
	
	/** 编号 [非空]       **/
	this.setId=function(setId){if(this.proxy)return this.getProxy().setId(setId);  this.put("setId", setId);return this;};
	/** and set_id is null */
	this.setIdNull=function(){if(this.proxy)return this.getProxy().setIdNull();if(this.get("setIdNot")==null)this.put("setIdNot", "");this.put("setId", null);return this;};
	/** not .... */
	this.setIdNot=function(){if(this.proxy)return this.getProxy().setIdNot();this.put("setIdNot", "not");return this;};
	this.setIdNotNull=function(){if(this.proxy)return this.getProxy().setIdNotNull();this.put("setIdNot", "not");this.put("setId", null);return this;};
	this.setIdNot=function(setId){if(this.proxy)return this.getProxy().setIdNot(setId);this.put("setIdNot", "not");this.put("setId", setId);return this;};
		
	/** and set_id <= ? */
	this.setIdMin=function(min){if(this.proxy)return this.getProxy().setIdMin(min);this.put("setIdMin", min);return this;};
	/** and set_id >= ? */
	this.setIdMax=function(max){if(this.proxy)return this.getProxy().setIdMax(max);this.put("setIdMax", max);return this;};
		
		
	this.setIdIn=function(ids){
		if(this.proxy)return this.getProxy().setIdIn(ids);  this.put("setIdIn", ids);return this;
	};	
		 
	
	
	/** 类型名称 [非空]       **/
	this.setName=function(setName){if(this.proxy)return this.getProxy().setName(setName);  this.put("setName", setName);return this;};
	/** and set_name is null */
	this.setNameNull=function(){if(this.proxy)return this.getProxy().setNameNull();if(this.get("setNameNot")==null)this.put("setNameNot", "");this.put("setName", null);return this;};
	/** not .... */
	this.setNameNot=function(){if(this.proxy)return this.getProxy().setNameNot();this.put("setNameNot", "not");return this;};
	this.setNameNotNull=function(){if(this.proxy)return this.getProxy().setNameNotNull();this.put("setNameNot", "not");this.put("setName", null);return this;};
	this.setNameNot=function(setName){if(this.proxy)return this.getProxy().setNameNot(setName);this.put("setNameNot", "not");this.put("setName", setName);return this;};
		
		 
	
	
	/** 事件级别 [非空]   0:自定提示 1:强制提示 2:全员提示     **/
	this.setLevel=function(setLevel){if(this.proxy)return this.getProxy().setLevel(setLevel);  this.put("setLevel", setLevel);return this;};
	/** and set_level is null */
	this.setLevelNull=function(){if(this.proxy)return this.getProxy().setLevelNull();if(this.get("setLevelNot")==null)this.put("setLevelNot", "");this.put("setLevel", null);return this;};
	/** not .... */
	this.setLevelNot=function(){if(this.proxy)return this.getProxy().setLevelNot();this.put("setLevelNot", "not");return this;};
	this.setLevelNotNull=function(){if(this.proxy)return this.getProxy().setLevelNotNull();this.put("setLevelNot", "not");this.put("setLevel", null);return this;};
	this.setLevelNot=function(setLevel){if(this.proxy)return this.getProxy().setLevelNot(setLevel);this.put("setLevelNot", "not");this.put("setLevel", setLevel);return this;};
		
		
	this.setLevelIn=function(ids){
		if(this.proxy)return this.getProxy().setLevelIn(ids);  this.put("setLevelIn", ids);return this;
	};	
		 
	
	
	/** 时间间隔    0:不限制 60:一分钟 600:十分钟 1800:半小时 3600:一小时 7200:两小时 43200:半天 86400:一天 2592000:一个月     **/
	this.setInterval=function(setInterval){if(this.proxy)return this.getProxy().setInterval(setInterval);  this.put("setInterval", setInterval);return this;};
	/** and set_interval is null */
	this.setIntervalNull=function(){if(this.proxy)return this.getProxy().setIntervalNull();if(this.get("setIntervalNot")==null)this.put("setIntervalNot", "");this.put("setInterval", null);return this;};
	/** not .... */
	this.setIntervalNot=function(){if(this.proxy)return this.getProxy().setIntervalNot();this.put("setIntervalNot", "not");return this;};
	this.setIntervalNotNull=function(){if(this.proxy)return this.getProxy().setIntervalNotNull();this.put("setIntervalNot", "not");this.put("setInterval", null);return this;};
	this.setIntervalNot=function(setInterval){if(this.proxy)return this.getProxy().setIntervalNot(setInterval);this.put("setIntervalNot", "not");this.put("setInterval", setInterval);return this;};
		
		
	this.setIntervalIn=function(ids){
		if(this.proxy)return this.getProxy().setIntervalIn(ids);  this.put("setIntervalIn", ids);return this;
	};	
		 
	
	
	/** 修改时间 [非空]       **/
	this.setUpdateTime=function(setUpdateTime){if(this.proxy)return this.getProxy().setUpdateTime(setUpdateTime);  this.put("setUpdateTime", setUpdateTime);return this;};
	/** and set_update_time is null */
	this.setUpdateTimeNull=function(){if(this.proxy)return this.getProxy().setUpdateTimeNull();if(this.get("setUpdateTimeNot")==null)this.put("setUpdateTimeNot", "");this.put("setUpdateTime", null);return this;};
	/** not .... */
	this.setUpdateTimeNot=function(){if(this.proxy)return this.getProxy().setUpdateTimeNot();this.put("setUpdateTimeNot", "not");return this;};
	this.setUpdateTimeNotNull=function(){if(this.proxy)return this.getProxy().setUpdateTimeNotNull();this.put("setUpdateTimeNot", "not");this.put("setUpdateTime", null);return this;};
	this.setUpdateTimeNot=function(setUpdateTime){if(this.proxy)return this.getProxy().setUpdateTimeNot(setUpdateTime);this.put("setUpdateTimeNot", "not");this.put("setUpdateTime", setUpdateTime);return this;};
		
	/** and set_update_time >= ? */
	this.setUpdateTimeStart=function(start){if(this.proxy)return this.getProxy().setUpdateTimeStart(start);this.put("setUpdateTimeStart", start);return this;};			
	/** and set_update_time <= ? */
	this.setUpdateTimeEnd=function(end){if(this.proxy)return this.getProxy().setUpdateTimeEnd(end);this.put("setUpdateTimeEnd", end);return this;};
		
		 
	
	
	/** 添加时间 [非空]       **/
	this.setAddTime=function(setAddTime){if(this.proxy)return this.getProxy().setAddTime(setAddTime);  this.put("setAddTime", setAddTime);return this;};
	/** and set_add_time is null */
	this.setAddTimeNull=function(){if(this.proxy)return this.getProxy().setAddTimeNull();if(this.get("setAddTimeNot")==null)this.put("setAddTimeNot", "");this.put("setAddTime", null);return this;};
	/** not .... */
	this.setAddTimeNot=function(){if(this.proxy)return this.getProxy().setAddTimeNot();this.put("setAddTimeNot", "not");return this;};
	this.setAddTimeNotNull=function(){if(this.proxy)return this.getProxy().setAddTimeNotNull();this.put("setAddTimeNot", "not");this.put("setAddTime", null);return this;};
	this.setAddTimeNot=function(setAddTime){if(this.proxy)return this.getProxy().setAddTimeNot(setAddTime);this.put("setAddTimeNot", "not");this.put("setAddTime", setAddTime);return this;};
		
	/** and set_add_time >= ? */
	this.setAddTimeStart=function(start){if(this.proxy)return this.getProxy().setAddTimeStart(start);this.put("setAddTimeStart", start);return this;};			
	/** and set_add_time <= ? */
	this.setAddTimeEnd=function(end){if(this.proxy)return this.getProxy().setAddTimeEnd(end);this.put("setAddTimeEnd", end);return this;};
		
		 
	
	
	/** 状态 [非空]   1:启用 0:禁用     **/
	this.setStatus=function(setStatus){if(this.proxy)return this.getProxy().setStatus(setStatus);  this.put("setStatus", setStatus);return this;};
	/** and set_status is null */
	this.setStatusNull=function(){if(this.proxy)return this.getProxy().setStatusNull();if(this.get("setStatusNot")==null)this.put("setStatusNot", "");this.put("setStatus", null);return this;};
	/** not .... */
	this.setStatusNot=function(){if(this.proxy)return this.getProxy().setStatusNot();this.put("setStatusNot", "not");return this;};
	this.setStatusNotNull=function(){if(this.proxy)return this.getProxy().setStatusNotNull();this.put("setStatusNot", "not");this.put("setStatus", null);return this;};
	this.setStatusNot=function(setStatus){if(this.proxy)return this.getProxy().setStatusNot(setStatus);this.put("setStatusNot", "not");this.put("setStatus", setStatus);return this;};
		
		
	this.setStatusIn=function(ids){
		if(this.proxy)return this.getProxy().setStatusIn(ids);  this.put("setStatusIn", ids);return this;
	};	
		 
	
	
	
	this.add=function(key,value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	this.desc=function(sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	this.asc=function(sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	this.definex=function(sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	
	/** 获取所有事件类型 **/
	this.list=function(size){
		this.data.size = size;
		var protocol = ux.ajax("/admin/systematic/eventtype.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list)return protocol.data.list;
		return [];
	}
	/** 获取事件类型分页 **/
	this.page=function(page,size){
		this.data.size = size;
		this.data.page = page;
		var protocol = ux.ajax("/admin/systematic/eventtype.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data)return data;
		return {list:[]};
	}
	/** 根据查询条件取事件类型 **/
	this.get=function(){
		this.data.size = 1;
		var protocol = ux.ajax("/admin/systematic/eventtype.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list && protocol.data.list.length==1)return protocol.data.list[0]; 
		return null;
	}
}

SrvEventType.get = function(id){
	var protocol = ux.ajax("/admin/systematic/eventtype.get.do",{id:id});
	if(!protocol)return null;
	if(protocol.data)return protocol.data.srvEventType;
	return null;
}

SrvEventType.where = new SrvEventType.Where(0,true);